package com.gqs.bookstore.vo;

import java.io.Serializable;
import java.util.Date;

@SuppressWarnings("serial")
public class Users implements Serializable {
	/**
	 *   `id` int(11) NOT NULL AUTO_INCREMENT,
		  `nikename` varchar(50) NOT NULL,
		  `account` varchar(50) NOT NULL,
		  `password_digist` varchar(64) NOT NULL,
		  `salt` varchar(64) NOT NULL,
		  `phone` varchar(20) DEFAULT NULL,
		  `last_login_time` datetime DEFAULT NULL,
		  `create_at` datetime DEFAULT NULL,
		  `update_at` datetime DEFAULT NULL,
	 */
	private Long id = null;//用户编号
	private String nikename = null;//用户昵称	
	private String account = null;//登录名--使用邮箱【实际上后期前台应该设置只能输入email格式】
	private String password = null;//明文密码--不需要存到数据库里
	private String password_digist = null;//登录密码--密文
	private String salt = null;//随机数
	private String phone = null;
	private Date last_login_time = null;//最后一次登录时间	
	private Date createAt = null;
	private Date updateAt = null;
	public Users() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Users(String nikename, String account, String password_digist,
			String salt, String phone, Date last_login_time, Date createAt,
			Date updateAt) {
		super();
		this.nikename = nikename;
		this.account = account;
		this.password_digist = password_digist;
		this.salt = salt;
		this.phone = phone;
		this.last_login_time = last_login_time;
		this.createAt = createAt;
		this.updateAt = updateAt;
	}
	
	
	public Users(String nikename, String account, String password, String phone) {
		super();
		this.nikename = nikename;
		this.account = account;
		this.password = password;
		this.phone = phone;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getNikename() {
		return nikename;
	}
	public void setNikename(String nikename) {
		this.nikename = nikename;
	}
	public String getAccount() {
		return account;
	}
	public void setAccount(String account) {
		this.account = account;
	}
	public String getPassword_digist() {
		return password_digist;
	}
	public void setPassword_digist(String password_digist) {
		this.password_digist = password_digist;
	}
	public String getSalt() {
		return salt;
	}
	public void setSalt(String salt) {
		this.salt = salt;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public Date getLast_login_time() {
		return last_login_time;
	}
	public void setLast_login_time(Date last_login_time) {
		this.last_login_time = last_login_time;
	}
	public Date getCreateAt() {
		return createAt;
	}
	public void setCreateAt(Date createAt) {
		this.createAt = createAt;
	}
	public Date getUpdateAt() {
		return updateAt;
	}
	public void setUpdateAt(Date updateAt) {
		this.updateAt = updateAt;
	}
	@Override
	public String toString() {
		return "Users [id=" + id + ", nikename=" + nikename + ", account="
				+ account + ", password_digist=" + password_digist + ", salt="
				+ salt + ", phone=" + phone + ", last_login_time="
				+ last_login_time + ", createAt=" + createAt + ", updateAt="
				+ updateAt + "]";
	}
	
}
